﻿using System;
using ltModel;

public partial class ltMan_users_changePwd : AdminBasePage
{
    protected void RadSave_Click(object sender, EventArgs e)
    {
        if (DataProtector.EncryptDBString(oldpw.Text) != CurrentUser.userpass)
        {
            OperateLog.AddFailedLog(CurrentUser.user_id, Request.UserHostAddress, "个人管理-修改密码>原密码不正确");
            infoPanel.AddErrorInfo("原密码不正确");
            return;
        }
        ltModel.BLL.article_user aubl = new ltModel.BLL.article_user();
        ltModel.Model.article_user au = CurrentUser;
        au.userpass = DataProtector.EncryptDBString(newpw.Text);
        aubl.Update(au);
        infoPanel.AddSuccessInfo("修改成功");
        OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "个人管理-修改密码");
    }
}